<style>
    #bc_city{
         -moz-appearance: none;background: rgba(0, 0, 0, 0) url("http://img2.isou365.cn/paimai/yunying/images/sanjiao.jpg") no-repeat scroll 130px 5px;border: 1px solid #d7d7d7;color: #666;float: left;
    font-family: "微软雅黑";font-size: 12px;height: 26px;line-height: 26px;margin: 0 10px 10px 0;text-align: left;width: 154px; margin-left:10px; 
    }
</style>
    <div class="yuSuo clearfix" style="float:left;">
        <form id="searchFrom">
            <input id="status" name="status" type="hidden" value="{$params.status}"/>
            <?php if($params['status'] == 3):?>
                <input type="text" id="start_time" name="start_time" value="{$params.sign_start_time}" placeholder="下次跟踪时间" readonly /><em></em>
                <input type="text" id="end_time" name="end_time" value="{$params.sign_end_time}" placeholder="下次跟踪时间" readonly />
            <?php else:?>
                <input type="text" id="start_time" name="start_time" value="{$params.sign_start_time}" placeholder="预约时间" readonly /><em></em>
                <input type="text" id="end_time" name="end_time" value="{$params.sign_end_time}" placeholder="预约时间" readonly />
            <?php endif;?>
             <select name="bc_city" id="bc_city">
                 <option value="">请选择所在地</option>   
                <?php foreach ($bc_city as $k => $v): ?>
                    <option value="{$k}"
                    <?php if ($params['bc_city'] == $k): ?>
                        selected = "selected"
                    <?php endif ?>
                    >{$v}</option>
                <?php endforeach ?>
            </select>
            <input type="text" name="order_no" value="{$params.order_no}"  placeholder="拍卖单号"  class="suoDian suoDian1">
            <input type="button" onclick="search();" value="搜索" class="suoSou" style="width:80px;">
        </form>
    </div>
    <table class="table table-bordered">
        <thead>
            <tr>
                <!-- <th><input type="checkbox"  id="checkAll" /> 全选</th> -->
                <th width="10%">拍卖单号</th>
                <th width="15%">车型</th>
                <th width="6%">所在地</th>
                <?php if($params['status'] == 2):?>
                <th width="10%">预约时间</th>
                <?php else:?>
                <th width="8%">下次跟踪时间</th>
                <?php endif;?>
                <th width="10%">预约地址/门店</th>
                <th width="6%">车主姓名</th>
                <th width="8%">车主电话</th>
                <?php if($params['auth']):?>
                <th width="6%">交付顾问</th>
                <?php endif;?>
                <th width="6%">状态</th>
                <th width="6%">操作</th>
            </tr>
        </thead>
        <tbody>    
        <volist name="list" id="vo" key="k">
            <tr>
                <!-- <td><input type="checkbox" name="order_ids[]"/></td> -->
                <td>{$vo.order_no}</td>
                <td>
                  <a href="/Car/report/car_id/{$vo.car_id}"  target="_blank">{$vo.model}</a>
                </td>
                <td>{$vo.bc_city_name}</td>
                <td>{$vo.sign_reserve_time}</td>
                <td>{$vo.address}</td>
                <td>{$vo.seller_name}</td>
                <td>{$vo.phone}</td>
                <?php if($params['auth']):?>
                <td>{$vo.deliver_name}</td>
                <?php endif;?>
                <?php if($params['status']==2): ?>
                <td>待签约</td>
                <?php elseif($params['status']==3): ?>
                <td>跟踪中</td>
                <?php endif;?>
                <td>
                <?php if($vo['deliver_id']==$params['emp_id']):?>
                    <?php if ($vo['is_lock'] == 1): ?>
                        <a href="javascript:" class="ash-grey"><?php echo ($params['status']==2 || $params['status']==3) ? '签约':'查看';?></a>
                    <?php else: ?>
                        <a href="/Sign/signature?id={$vo.order_id}&status={$params.status}" target="_blank"><?php echo ($params['status']==2 || $params['status']==3) ? '签约':'查看';?></a>
                    <?php endif ?>
                <?php endif;?>
                <?php if ($vo['is_again_void']): ?>
                    <a href="javascript:" onclick="violate({$vo.order_id})">违约</a>
                <?php endif ?>
                </td>
            </tr>
        </volist>
        </tbody>
    </table>
<!--违约-->
<div class="chenggong1">
    <span class="paidan">您确定要置为违约吗?</span>
    <div class="shenhei-btn">
        <input type="hidden" name="order_id"  value="" />
        <input type="button" value="确定" class="determine" />
        <input type="button" value="取消" class="cancel" />
    </div>
</div>
<div class="yunBei"></div>
    <script>
    function violate(order_id){
        $('.chenggong1').css('display', 'block');
        $('.yunBei').css({'display':'block',"zIndex":999});
        $('input[name=order_id]').val(order_id);
    }
    $(".determine").on('click', function () {
        var order_id = $('input[name=order_id]').val();
        var param = {
            'order_id':order_id
        };
        var btn_obj = $(this);
        btn_obj.val("提交中...").attr("disabled",'disabled');
        $.post('/Sign/violate', param, function (data) {
            if (data.code == '200') {
                btn_alert(data.msg);
                $('.chenggong1').fadeOut();
                btn_obj.val("确定").removeAttr("disabled style");
                setTimeout(function () {
                        window.location.reload();
                    }, 500);
            } else {
                shibai_alert(data.msg)
                btn_obj.val("确定").removeAttr("disabled style");
                $('.chenggong1').fadeOut();
            }
            $('.yunBei').css({'display':'none',"zIndex":999});
        }, 'json');
    });
    $(".cancel").on('click', function () {
        $('.chenggong1').fadeOut();
        $('.yunBei').css({'display':'none',"zIndex":999});
    });
    </script>    